import { request } from "@/utils";

export const menuApi = {
  getTree: () => request.get<Menu[]>("/menu/tree"),
  getAliveTree: () => request.get<Menu[]>("/menu/tree/alive"),
  add: (data: Menu) => request.post("/menu", data),
  update: (data: Menu) => request.put("/menu", data),
  remove: (id: string) => request.delete("/menu", { id }),
};
